$(function () {
	vm.mentorId = getQueryString("id");
	vm.getInfo(vm.mentorId);	
});

var vm = new Vue({
	el:'#mapp',
	data:{
		title: "导师详情",
		bsnMentor: {},
		mentorId: ""
	},
	methods: {
		getInfo: function(id){
			console.log(StringUtils.isEmpty(id));
			
			if (StringUtils.isEmpty(id)) return;
			var thisUrl = ajaxServerUrlG("bsnmentor/info/" + id);
			$.get(thisUrl, function(r){
					if(r.code === 0){
                		vm.bsnMentor = r.bsnMentor;
					}else{
						alert(r.msg);
					} 
            });
		},
		preView: function(jianliurl) {
			if (StringUtils.isEmpty(jianliurl)) {
				return;
			}
			console.log("附件=" + jianliurl);
			var uploadUrl = getDownFileUrl(jianliurl);
			if (/iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())) {
				openFileView(uploadUrl);
			} else {
				window.jsInvoke.openFileView(uploadUrl);
			}
		}
	},
	filters: {
		attachFilter: function(jianliurl) {
			if (StringUtils.isNotEmpty(jianliurl)) {
				return "点击查看个人简历";
			} else {
				return "无";
			}
		}
	}
});